<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head><h:outputStylesheet name="common-style.css" library="css" /></h:head>

<body>
	<h:form id="loginForm">
		<p:growl id="growl" globalOnly="true"></p:growl>
		<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" globalOnly="true"/>  
		<p:panel header="SmtERP - Đăng nhập">
			<h:panelGrid id="loginPanel" columns="2">
				<h:outputText value="Tên đăng nhập: " />
				<p:inputText id="username" value="#{mbAuthentication.user.login}"
					required="true"></p:inputText>
				<p:spacer></p:spacer>
				<p:message for="username"></p:message>
				<h:outputText value="Mật khẩu: " />
				<p:password id="password" value="#{mbAuthentication.user.pwd}"
					required="true" feedback="false"></p:password>
				<p:spacer></p:spacer>
				<p:message for="password"></p:message>
				<p:spacer></p:spacer>
				<p:commandButton action="#{mbAuthentication.doLogin}" value="Đăng nhập"
					ajax="false"></p:commandButton>
			</h:panelGrid>
		</p:panel>
	</h:form>
	<ui:include src="/template/footer.xhtml"></ui:include>
</body>
</html>